<?php
$db['warranty_reg'] = array(
        "columns" => array(
                "reg_id"=>array(
                        "type" => "number",
                        "required" => true,
                        "pkey" => true,
                        "extra" => "auto_increment",
                        "label" => app::get( "yswarranty" )->_( "註冊索引" ),
                        "width" => 30,
                        "editable" => false,
                        "in_list" => false
                ),
                "member_id"=>array(
                        "type" => "table:members@b2c",
                        "default" => "0",
                        "required" => true,
                        "editable" => false,
                        "in_list" => true,
                        "default_in_list" => true,
                        "label" => app::get( "yswarranty" )->_( "客戶" )
                ),
                "product_style"=>array(
                        "type" => "varchar(30)",
                        "label" => app::get( "yswarranty" )->_( "機種" ),
                        "width" => 100,
                        "searchtype" => "head",
                        "editable" => true,
                        "filtertype" => "yes",
                        "filterdefault" => true,
                        "in_list" => true,
                        "default_in_list" => true
                ),
                "product_no"=>array(
                        "type" => "varchar(30)",
                        "label" => app::get( "yswarranty" )->_( "機號" ),
                        "width" => 100,
                        "searchtype" => "head",
                        "editable" => true,
                        "filtertype" => "yes",
                        "filterdefault" => true,
                        "in_list" => true,
                        "default_in_list" => true
                ),
                "warranty_no"=>array(
                        "type" => "varchar(30)",
                        "label" => app::get( "yswarranty" )->_( "保證書編號" ),
                        "width" => 100,
                        "searchtype" => "head",
                        "editable" => true,
                        "filtertype" => "yes",
                        "filterdefault" => true,
                        "in_list" => true,
                        "default_in_list" => true
                ),
                "purchase_date"=>array(
                        "type" => "cdate",
                        "label" => app::get( "yswarranty" )->_( "購買日期" ),
                        "width" => 50,
                        "editable" => true,
                        "in_list" => true,
                        "default_in_list" => true
                ),
                "channel"=>array(
                        "type"=>array(
                                0 => app::get( "yswarranty" )->_( "未指定" ),
                                1 => app::get( "yswarranty" )->_( "網(郵)購" ),
                                2 => app::get( "yswarranty" )->_( "量販店(或大賣場)" ),
                                3 => app::get( "yswarranty" )->_( "電器行" ),
                                4 => app::get( "yswarranty" )->_( "TV購" ),
                                5 => app::get( "yswarranty" )->_( "其他" )
                        ),
                        "default" => 0,
                        "label" => app::get( "b2c" )->_( " 購買方式" ),
                        "required" => true,
                        "editable" => false,
                        "filtertype" => "yes",
                        "filterdefault" => true,
                        "in_list" => true,
                        "default_in_list" => true
                ),
                "other_channel"=>array(
                        "type" => "varchar(20)",
                        "label" => app::get( "yswarranty" )->_( "其他購買管道" ),
                        "width" => 20,
                        "editable" => false,
                        "filtertype" => "normal",
                        "in_list" => true
                ),
                "verify_code"=>array(
                        "type" => "varchar(10)",
                        "label" => app::get( "yswarranty" )->_( "保證書驗證碼" ),
                        "width" => 10,
                        "editable" => false,
                        "filtertype" => "normal",
                        "in_list" => true
                ),
                "reseller_name"=>array(
                        "type" => "varchar(30)",
                        "label" => app::get( "yswarranty" )->_( "原購經銷商店名" ),
                        "width" => 30,
                        "editable" => false,
                        "filtertype" => "normal",
                        "in_list" => true
                ),
                "reseller_region"=>array(
                        "type" => "varchar(50)",
                        "label" => app::get( "yswarranty" )->_( "原購經銷商地區" ),
                        "width" => 100,
                        "editable" => false,
                        "filtertype" => "normal",
                        "in_list" => true
                ),
                "reseller_address"=>array(
                        "type" => "varchar(100)",
                        "label" => app::get( "yswarranty" )->_( "原購經銷商地址" ),
                        "width" => 100,
                        "editable" => true,
                        "filtertype" => "normal",
                        "in_list" => true
                ),
                "createat"=>array(
                        "type" => "time",
                        "label" => app::get( "yswarranty" )->_( "建立時間" ),
                        "width" => 50,
                        "editable" => false,
                        "in_list" => true,
                        "default_in_list" => true
                ),
                "last_modified"=>array(
                        "type" => "time",
                        "label" => app::get( "yswarranty" )->_( "修改時間" ),
                        "width" => 50,
                        "editable" => false,
                        "in_list" => true,
                        "default_in_list" => true
                ),
                "is_locked"=>array(
                        "type" => "tinybool",
                        "default" => "N",
                        "label" => app::get( "yswarranty" )->_( "已鎖定" ),
                        "required" => true,
                        "editable" => true,
                        "in_list" => true,
                        "default_in_list" => true
                )
        )
);
?>